
class TPshopLoginApi:
    @classmethod
    def get_verify_code_api(cls,session):   # 验证码
        resp_v = session.get(url="http://tpshop-test.itheima.net/index.php?m=Home&c=User&a=verify")
        return resp_v

    @classmethod
    def login_api(cls,session,data):  # 登录data
        url = "http://tpshop-test.itheima.net/index.php?m=Home&c=User&a=do_login"
        header =  {"Content-Type":"application/x-www-form-urlencoded"}
        resp = session.post(url=url,headers = header,data =data)
        return resp








